package com.topisv.tms.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.topisv.tms.entity.CusStockMerge;
import com.topisv.tms.repository.CusStockMergeDao;

@Component
@Transactional(readOnly = true)
public class CusStockMergeService {

	@Autowired
	private CusStockMergeDao cusStockMergeDao;
	
	public CusStockMerge findCustomerWarSku(String customerCode,String warehouseCode,String sku){
		return cusStockMergeDao.findCustomerWarSku(customerCode, warehouseCode, sku);
	}
	
	public List<CusStockMerge> findCustomerWarSku2(String customerCode,String warehouseCode,String sku){
		return cusStockMergeDao.findCustomerWarSku2(customerCode,warehouseCode, sku);
	}
	public List<CusStockMerge> findCustomerWarSku(String customerCode,String sku){
		return cusStockMergeDao.findCustomerWarSku(customerCode, sku);
	}
	
	public CusStockMerge save(CusStockMerge arg0){
		return cusStockMergeDao.save(arg0);
	}
	
	public int updateCusStockMerge(String customerCode, String warehouseCode, String sku, int num) {
	    return cusStockMergeDao.updateCusStockMerge(customerCode, warehouseCode, sku, num);
	}
}
